﻿<%@ CODEPAGE=65001 %>
<%
'///////////////////////////////////////////////////////////////////////////////
'// 插件应用:    Z-Blog 2.0 其它版本未知
'// 插件制作:    狼的旋律(http://www.wilf.cn) / zsx(http://www.zsxsoft.com)
'// 备    注:    设置
'// 最后修改:
'// 最后版本:
'///////////////////////////////////////////////////////////////////////////////
%>
<% Option Explicit %>
<% On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="../../c_option.asp" -->
<!-- #include file="../../../zb_system/function/c_function.asp" -->
<!-- #include file="../../../zb_system/function/c_system_lib.asp" -->
<!-- #include file="../../../zb_system/function/c_system_base.asp" -->
<!-- #include file="../../../zb_system/function/c_system_plugin.asp" -->
<!-- #include file="../p_config.asp" -->
<%
Call System_Initialize()
Call WindsPhoto_Initialize()

Call CheckReference("")

If BlogUser.Level>1 Then Call ShowError(6)
If CheckpluginState("windsphoto") = False Then Call ShowError(48)

BlogTitle = "WindsPhoto 相册设置"

'检查ASPJPEG组件,并把是否存在aspjpeg缓存到设置中,有用
Dim Jpeg,temprs
Set Jpeg = Server.CreateObject("Persits.Jpeg")
If -2147221005 = Err Or Jpeg.Expires<Now() Then
    Call SetBlogHint_Custom("当前服务器没有<a href=""http://www.aspjpeg.com/"" target=""_blank"">ASPJPEG组件</a>,你可以在无法生成缩略图和无法添加水印的情况下继续使用本相册.</a>")
    If WP_IF_ASPJPEG = True Then
		WP_Config.Write "WP_IF_ASPJPEG", "False"
		WP_Config.Save
        Response.Redirect "admin_setting.asp"
    End If
ElseIf WP_IF_ASPJPEG = False Then
		WP_Config.Write "WP_IF_ASPJPEG", "True"
		WP_Config.Save
		Response.Redirect "admin_setting.asp"
End If
Set Jpeg = Nothing
%>
<!--#include file="..\..\..\zb_system\admin\admin_header.asp"-->
<script type="text/javascript" src="../../../zb_system/ADMIN/ueditor/ueditor.config.asp"></script>
<script type="text/javascript" src="../../../zb_system/ADMIN/ueditor/ueditor.all.min.js"></script>
<!--#include file="..\..\..\zb_system\admin\admin_top.asp"-->
<div id="divMain"><div class="ShowBlogHint"><%Call GetBlogHint()%></div>
	<div class="divHeader"><%=BlogTitle%></div>
    <div class="SubMenu"><%=WindsPhoto_SubMenu(2)%></div>
    <div id="divMain2">
		<script type="text/javascript">ActiveLeftMenu("aWindsPhoto")</script>
		<form id="edit" name="edit" method="post" action="admin_cmd.asp?action=savesetting">
		<div class="content-box"><!-- Start Content Box -->
			<div class="content-box-header">
				<ul class="content-box-tabs">
					<li><a href="#fragment-1" class="default-tab"><span>参数设置</span></a></li>
					<li><a href="#fragment-2"><span>水印设置</span></a></li>
					<!--<li><a href="#fragment-3"><span>高级设置</span></a></li>-->
				</ul>
				<div class="clear"></div>
			</div>
			<div class="content-box-content">
			<div class="tab-content default-tab" style="border:none;padding:0px;margin:0;" id="fragment-1">
				<table width="100%" style="padding:0px;margin:1px;" cellspacing="0" cellpadding="0">
					<tr>
						<td style="width:32%"><p align="left">相册名称</p></td>
						<td style="width:68%"><p>
						  <input name="strWP_ALBUM_NAME" style="width:95%" type="text" value="<%=WP_ALBUM_NAME%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">相册域名(<%=IIF(ZC_PERMANENT_DOMAIN_ENABLE<>True,"锁定Z-Blog地址后可用","可修改")%>)</p></td>
						<td><p>
						  <input name="strWP_SUB_DOMAIN" style="width:95%" type="url" value="<%=WP_SUB_DOMAIN%>" <%=IIf(ZC_PERMANENT_DOMAIN_ENABLE<>True,"readonly","")%> />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">贴图相册(编辑文章时上传图片到此相册，默认不启用)</p></td>
						<td><p>
							<select name="strWP_BLOGPHOTO_ID">
							<option value="0">不启用</option>
							<%
							Set temprs = objConn.Execute("SELECT * FROM WindsPhoto_zhuanti order by ordered,id asc")
							Do While Not temprs.EOF
							Response.Write "<option value="""&temprs("id")&""" "&IIF(temprs("id")=WP_BLOGPHOTO_ID,"selected","")&">"&temprs("name")&"</option>"
							temprs.movenext
							Loop
							Set temprs = Nothing
							%>
							</select></p>
						</td>
					</tr>
					<tr>
						<td><p align="left">图片展示特效</p></td>
						<td><p>
						<input type="radio" name="strWP_SCRIPT_TYPE" id="script_1" value="1" <%=IIF(WP_SCRIPT_TYPE=1,"checked","")%> /><label for="script_1">HighSlide</label>
						<input type="radio" name="strWP_SCRIPT_TYPE" id="script_2" value="2" <%=IIF(WP_SCRIPT_TYPE=2,"checked","")%> /><label for="script_2">Lightbox</label>
						<input type="radio" name="strWP_SCRIPT_TYPE" id="script_3" value="3" <%=IIF(WP_SCRIPT_TYPE=3,"checked","")%> /><label for="script_3">fancyBox</label>
						<input type="radio" name="strWP_SCRIPT_TYPE" id="script_4" value="4" <%=IIF(WP_SCRIPT_TYPE=4,"checked","")%> /><label for="script_4">display.asp</label>
						<input type="radio" name="strWP_SCRIPT_TYPE" id="script_0" value="0" <%=IIF(WP_SCRIPT_TYPE=0,"checked","")%> /><label for="script_0">无</label></p></td>
					</tr>
					<tr>
						<td><p align="left">列表排序方式</p></td>
						<td><p>
						<input type="radio" name="strWP_ORDER_BY" id="order_0" value="0" <%=IIF(WP_ORDER_BY=0,"checked","")%> /><label for="order_0">正序</label>
						<input type="radio" name="strWP_ORDER_BY" id="order_1" value="1" <%=IIF(WP_ORDER_BY=1,"checked","")%> /><label for="order_1">倒序</label></p></td>
					</tr>
					<tr>
						<td><p align="left">上传目录(结尾不加/) </p></td>
						<td><p>
						<input name="strWP_UPLOAD_DIR" style="width:95%" type="text" value="<%=WP_UPLOAD_DIR%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">上传目录保存方式</p></td>
						<td><p>
						<input type="radio" name="strWP_UPLOAD_DIRBY" id="upload_1" value="1" <%=IIF(WP_UPLOAD_DIRBY=1,"checked","")%> /><label for="upload_1">年/月</label>
						<input type="radio" name="strWP_UPLOAD_DIRBY" id="upload_2" value="2" <%=IIF(WP_UPLOAD_DIRBY=2,"checked","")%> /><label for="upload_2">分类id</label>
						<input type="radio" name="strWP_UPLOAD_DIRBY" id="upload_0" value="0" <%=IIF(WP_UPLOAD_DIRBY=0,"checked","")%> /><label for="upload_0">根目录</label></p></td>
					</tr>
					<tr>
						<td><p align="left">默认开启上传重命名 </p></td>
						<td><p><input type="text" name="strWP_UPLOAD_RENAME" class="checkbox" value="<%=WP_UPLOAD_RENAME%>" /></p></td>
					</tr>
					<tr>
						<td><p align="left">首页显示相册数量 </p></td>
						<td><p>
						<input name="strWP_INDEX_PAGERCOUNT" style="width:95%" type="number" min="3" step="3" value="<%=WP_INDEX_PAGERCOUNT%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">缩略图模式分页</p></td>
						<td><p>
						<input name="strWP_SMALL_PAGERCOUNT" style="width:95%" type="number" min="3" step="3" value="<%=WP_SMALL_PAGERCOUNT%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">列表模式分页</p></td>
						<td><p>
						<input name="strWP_LIST_PAGERCOUNT" style="width:95%" type="number" min="1" value="<%=WP_LIST_PAGERCOUNT%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">默认自定义图片尺寸</p></td>
						<td><p>
						<input name="strWP_JPEG_WIDTH" style="width:50px" value="<%=WP_JPEG_WIDTH%>" /><span style="color:#a8a8a8;margin:0 3px 0 -20px;">px</span> <input type="text" name="strWP_JPEG_MAXWIDTH" id="maxwidth" class="checkbox" value="<%=WP_JPEG_MAXWIDTH%>" />默认原图
						</p></td>
					</tr>
					<tr>
						<td><p align="left">缩略图算法</p></td>
						<td><p>
						  <input type="radio" name="strWP_THUMB_TYPE" id="thumb_1" value="1" <%=IIF(WP_THUMB_TYPE=1,"checked","")%> /><label for="thumb_1">以长边进行等比例缩放</label>
						  <input type="radio" name="strWP_THUMB_TYPE" id="thumb_2" value="2" <%=IIF(WP_THUMB_TYPE=2,"checked","")%> /><label for="thumb_2">以短边进行裁剪缩放</label></p></td>
					</tr>
					<tr>
						<td><p align="left">缩略图尺寸</p></td>
						<td><p>
						<input name="strWP_SMALL_HEIGHT" style="width:50px;" value="<%=WP_SMALL_HEIGHT%>" /><span style="color:#a8a8a8;margin:0 3px 0 -20px;">px</span> * <input name="strWP_SMALL_WIDTH" style="width:50px;" value="<%=WP_SMALL_WIDTH%>" /><span style="color:#a8a8a8;margin:0 3px 0 -20px;">px</span>
						</p></td>
					</tr>
					<tr>
						<td><p align="left">列表模式图片宽度</p></td>
						<td><p>
						<input name="strWP_LIST_WIDTH" style="width:95%" type="number" value="<%=WP_LIST_WIDTH%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">瀑布流图片宽度</p></td>
						<td><p>
						<input name="strWP_WATERFLOW_WIDTH" style="width:95%" type="number" value="<%=WP_WATERFLOW_WIDTH%>" /></p></td>
					</tr>
					<tr>
						<td><p align="left">相册首页介绍说明</p></td>
						<td><div>
						<div><textarea name="strWP_ALBUM_INTRO" id="editor_ue" style="width:95%"><%=TransferHTML(WP_ALBUM_INTRO,"[textarea]")%></textarea></div>
						</div></td>
					</tr>
				</table>
			</div>

			<div class="tab-content" style="border:none;padding:0px;margin:0;" id="fragment-2">
				<table width="100%" style="padding:0px;margin:1px;" cellspacing="0" cellpadding="0">
					<tr>
						<td style="width:32%"><p align="left">默认开启水印</p></td>
						<td style="width:68%"><p>
						<input type="text" name="strWP_WATERMARK_AUTO" class="checkbox" value="<%=WP_WATERMARK_AUTO%>" /></p></td>
					</tr>
					<tr>
						<td><p align="left">水印类型</p></td>
						<td><p>
						  <input type="radio" name="strWP_WATERMARK_TYPE" id="type_1" value="1" <%=IIF(WP_WATERMARK_TYPE=1,"checked","")%> /><label for="type_1">文字水印</label>
						  <input type="radio" name="strWP_WATERMARK_TYPE" id="type_2" value="2" <%=IIF(WP_WATERMARK_TYPE=2,"checked","")%> /><label for="type_2">图片水印</label></p></td>
					</tr>
					<tr>
						<td><p align="left">水印水平位置</p></td>
						<td><p>
						<input type="radio" name="strWP_WATERMARK_WIDTH_POSITION" id="w_left" value="left" <%=IIF(WP_WATERMARK_WIDTH_POSITION="left","checked","")%> /><label for="w_left">左</label>
						<input type="radio" name="strWP_WATERMARK_WIDTH_POSITION" id="w_center" value="center" <%=IIF(WP_WATERMARK_WIDTH_POSITION="center","checked","")%> /><label for="w_center">中</label>
						<input type="radio" name="strWP_WATERMARK_WIDTH_POSITION" id="w_right" value="right" <%=IIF(WP_WATERMARK_WIDTH_POSITION="right","checked","")%> /><label for="w_right">右</label></p></td>
					</tr>
					<tr>
						<td><p align="left">水印垂直位置</p></td>
						<td><p>
						<input type="radio" name="strWP_WATERMARK_HEIGHT_POSITION" id="h_top" value="top" <%=IIF(WP_WATERMARK_HEIGHT_POSITION="top","checked","")%> /><label for="h_top">上</label>
						<input type="radio" name="strWP_WATERMARK_HEIGHT_POSITION" id="h_center" value="center" <%=IIF(WP_WATERMARK_HEIGHT_POSITION="center","checked","")%> /><label for="h_center">中</label>
						<input type="radio" name="strWP_WATERMARK_HEIGHT_POSITION" id="h_bottom" value="bottom" <%=IIF(WP_WATERMARK_HEIGHT_POSITION="bottom","checked","")%> /><label for="h_bottom">下</label></p></td>
					</tr>
					<tr>
						<td><p align="left">图片压缩质量(0-100,0为最低,100为最高)</p></td>
						<td><p>
						<input name="strWP_JPEG_QUALITY" id="quality_range" style="width:230px;" type="range" min="0" max="100" value="<%=WP_JPEG_QUALITY%>" onchange="document.getElementById('quality_num').value=this.value" /> <input id="quality_num" style="width:50px;text-align:center;vertical-align:top;" type="number" min="0" max="100" value="<%=WP_JPEG_QUALITY%>" onchange="document.getElementById('quality_range').value=this.value" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">水印图片路径(插件内的相对路径,<span title="需aspjpeg1.8以上">支持png和gif透明</span>)</p></td>
						<td><p>
						<input name="strWP_WATERMARK_LOGO" style="width:95%" type="text" value="<%=WP_WATERMARK_LOGO%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">水印图片透明度(<span title="aspjpeg1.8以上仅对jpg有效">0-1,0为完全透明,1为不透明</span>)</p></td>
						<td><p>
						<input name="strWP_WATERMARK_ALPHA" id="opaque_range" style="width:230px;" type="range" min="0" max="1" step="0.1" value="<%=WP_WATERMARK_ALPHA%>" onchange="document.getElementById('opaque_num').value=this.value" /> <input id="opaque_num" style="width:50px;text-align:center;vertical-align:top;" type="number" min="0" max="1" step="0.1" value="<%=WP_WATERMARK_ALPHA%>" onchange="document.getElementById('opaque_range').value=this.value" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">水印文字</p></td>
						<td><p>
						<input name="strWP_WATERMARK_TEXT" style="width:95%" type="text" value="<%=WP_WATERMARK_TEXT%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">水印字体</p></td>
						<td><p>
						<input name="strWP_JPEG_FONTFAMILY" style="width:95%" type="text" value="<%=WP_JPEG_FONTFAMILY%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">文字质量(0默认,1草稿,2校样,3不抗锯齿,4抗锯齿)</p></td>
						<td><p>
						<input name="strWP_JPEG_FONTQUALITY" style="width:95%" type="number" min="0" max="4" value="<%=WP_JPEG_FONTQUALITY%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">文字大小</p></td>
						<td><p>
						<input name="strWP_JPEG_FONTSIZE" style="width:95%" type="number" min="1" max="100" value="<%=WP_JPEG_FONTSIZE%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">文字颜色</p></td>
						<td><p>
						<input name="strWP_JPEG_FONTCOLOR" type="color" value="<%=WP_JPEG_FONTCOLOR%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">文字粗体</p></td>
						<td><p>
						<input type="text" name="strWP_JPEG_FONTBOLD" class="checkbox" value="<%=WP_JPEG_FONTBOLD%>" />
					</tr>
					<tr>
						<td><p align="left">文字斜体</p></td>
						<td><p>
						<input type="text" name="strWP_JPEG_FONTITALIC" class="checkbox" value="<%=WP_JPEG_FONTITALIC%>" />
					</tr>
				</table>
			</div>

			<div class="tab-content" style="border:none;padding:0px;margin:0;" id="fragment-3">
				<table width="100%" style="padding:0px;margin:1px;" cellspacing="0" cellpadding="0">
					<tr>
						<td style="width:32%"><p align="left">EXIF项目</p></td>
						<td style="width:68%"><p>
						<input name="strWP_EXIF_ITEMS" style="width:95%" type="text" value="<%=WP_EXIF_ITEMS%>" />
						</p></td>
					</tr>
					<tr>
						<td><p align="left">相机型号替换(替换QCOM-AA、QCAM-AA为自定义型号)</p></td>
						<td><p>
						<input name="strWP_CAMERA_MODEL" style="width:95%" type="text" value="<%=WP_CAMERA_MODEL%>" />
						</p></td>
					</tr>
				</table>
			</div>

			</div>
			<p>
				<input type="submit" class="button" value="提交" id="btnPost" />
				<input type="reset" class="button" value="重置" id="btnPost" />
			</p>
		</div>
		</form>
	</div>
</div>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
	$("#edit").submit(function(){
		if(editor.queryCommandState("source")==1) editor.execCommand("source");
	}) //源码模式下保存时必须切换
});

var EditorOption = {
	toolbars:[['Source','fontsize','bold','italic','forecolor','emotion','blockquote','link','removeformat','formatmatch','autotypeset','insertorderedlist','insertunorderedlist','pasteplain']],
	autoHeightEnabled:false,
	initialFrameHeight:100
};
var editor=UE.getEditor('editor_ue',EditorOption);

$(document).ready(function(){
	var r = document.getElementById("quality_range");
	if(r.type == "text"){
		$("#opaque_range").hide();
		$("#quality_range").hide();
	}
});
// ]]>
</script>
<!--#include file="..\..\..\zb_system\admin\admin_footer.asp"-->
<%Call System_Terminate()%>